1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package com.google.common.collect;
18
19 import com.google.common.annotations.GwtCompatible;
20
21 import junit.framework.TestCase;
22
23 import java.util.SortedMap;
24 import java.util.SortedSet;
25
26
27
28
29
30
31 @GwtCompatible(emulated = true)
32 public class MultimapBuilderTest extends TestCase {
33
34 public void testGenerics_gwtCompatible() {
35 ListMultimap<String, Integer> a =
36 MultimapBuilder.hashKeys().arrayListValues().<String, Integer>build();
37 SortedSetMultimap<String, Integer> b =
38 MultimapBuilder.linkedHashKeys().treeSetValues().<String, Integer>build();
39 SetMultimap<String, Integer> c = MultimapBuilder.treeKeys(String.CASE_INSENSITIVE_ORDER)
40 .hashSetValues().<String, Integer>build();
41 }
42
43 public void testTreeKeys_gwtCompatible() {
44 ListMultimap<String, Integer> multimap =
45 MultimapBuilder.treeKeys().arrayListValues().<String, Integer>build();
46 assertTrue(multimap.keySet() instanceof SortedSet);
47 assertTrue(multimap.asMap() instanceof SortedMap);
48 }
49 }
50